﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/BaseInfoMaster.master"
    CodeFile="EditSMSLibrary.aspx.cs" Inherits="EditSMSLibrary" CodeFileBaseClass="Frame.Pages.BaseInfomationEditBasePage" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2.Linq, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="stylesheet" href="../Content/Site.css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1 class="DemoTitle">
        短信库管理
    </h1>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxButton ID="btn_Show" AutoPostBack="false" runat="server" Text="查看占位符">
            <ClientSideEvents Click="function(s,e){c_PlaceholderList.Show(); }" />
        </dx:ASPxButton>
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxGridView ID="gridView" runat="server" Width="100%" AutoGenerateColumns="False"
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" DataSourceID="LSMDSourceMain"
            KeyFieldName="SMSLibraryID">
            <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                </Header>
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <ImagesFilterControl>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </ImagesFilterControl>
            <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                <LoadingPanelOnStatusBar Url="~/App_Themes/DevEx/GridView/StatusBarLoading.gif">
                </LoadingPanelOnStatusBar>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </Images>
            <Columns>
                <dx:GridViewDataTextColumn Name="t_SMSLibraryID" FieldName="SMSLibraryID" VisibleIndex="0"
                    CellStyle-HorizontalAlign="Right" ReadOnly="true" Caption="自动编码">
                    <PropertiesTextEdit Native="true" Width="260px">
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataMemoColumn Name="t_SMSContent" FieldName="SMSContent" VisibleIndex="1"
                    CellStyle-HorizontalAlign="Left" Caption="短信内容">
                    <PropertiesMemoEdit Width="300px" Height="100px">
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="短信内容不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesMemoEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                </dx:GridViewDataMemoColumn>
                <dx:GridViewDataComboBoxColumn Name="t_SMSClass_ID" FieldName="SMSClass_ID" VisibleIndex="2"
                    CellStyle-HorizontalAlign="Center" Caption="短信类别id">
                    <PropertiesComboBox Native="true" Width="260px">
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="短信类别id不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesComboBox>
                </dx:GridViewDataComboBoxColumn>
            </Columns>
            <StylesEditors ButtonEditCellSpacing="0">
                <ProgressBar Height="21px">
                </ProgressBar>
            </StylesEditors>
            <SettingsEditing EditFormColumnCount="1" />
        </dx:ASPxGridView>
        <dx:LinqServerModeDataSource ID="LSMDSourceMain" runat="server" EnableDelete="true"
            EnableUpdate="true" EnableInsert="true" ContextTypeName="DAL.CMSDALDataContext"
            TableName="BI_SMSLibrary" />
        <dx:ASPxPopupControl ID="PlaceholderListPopup" Width="300px" ClientInstanceName="c_PlaceholderList"
            HeaderText="占位符列表" CloseAction="CloseButton" AllowDragging="true" PopupVerticalAlign="WindowCenter"
            PopupHorizontalAlign="WindowCenter" runat="server">
            <ContentCollection>
                <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
                    <dx:ASPxComboBox ID="cbo_Table" runat="server">
                        <Items>
                            <dx:ListEditItem Text="预定信息" Value="1" Selected="true" />
                            <dx:ListEditItem Text="IC卡信息" Value="2" />
                            <dx:ListEditItem Text="纪念日信息" Value="3" />
                        </Items>
                        <ClientSideEvents SelectedIndexChanged="function(s,e){c_gv_pl.PerformCallback(s.GetValue()); }" />
                    </dx:ASPxComboBox>
                    <dx:ASPxGridView ID="gv_PlaceholderList" Width="100%" ClientInstanceName="c_gv_pl"
                        runat="server" OnCustomCallback="gv_PlaceholderList_CustomCallback">
                        <Columns>
                            <dx:GridViewDataTextColumn Caption="名称" FieldName="0" VisibleIndex="1">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="占位符" FieldName="1" VisibleIndex="2">
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <SettingsPager Visible="False">
                        </SettingsPager>
                    </dx:ASPxGridView>
                </dx:PopupControlContentControl>
            </ContentCollection>
        </dx:ASPxPopupControl>
    </div>
</asp:Content>
